info <- c(1,2,4,8)
names <- c('Google','Baidu','Tecent','MicroSoft')
cols <- c("#ED1C24","#22B14C","#FFC90E","#3f48CC")
percent <- paste(round(100*info/sum(info)),'%')
jpeg(file='pie.jpeg')
pie(info,labels=percent,main='网站分析',col=cols,family='GB1')
legend('topright',names,cex=0.8,fill=cols)
dev.off()

library(plotrix)
png(file='3Dpie.png')
pie3D(info,labels=names,explode=0.1,main='3D图',family='STHeitiTC-Light')
dev.off()
